#!/bin/sh
APP_BIN_NAME=$1
APP_VERSION=$2
TARGET_PLATFORM=$3


echo APP_BIN_NAME=$APP_BIN_NAME
echo APP_VERSION=$APP_VERSION
echo TARGET_PLATFORM=$TARGET_PLATFORM

export APP_NAME=$APP_BIN_NAME

echo "*************************************************************************"
echo "************************COMPILE BEGIN************************************"
echo "*************************************************************************"
set -e


make clean -C ./bk_idk/
echo "*************************************************************************"
echo "************************CLEAN SUCCESS************************************"
echo "*************************************************************************"

make $TARGET_PLATFORM PROJECT_DIR=../projects/media/doorbell BUILD_DIR=../build APP_NAME=$APP_BIN_NAME APP_VERSION=$APP_VERSION  -C ./bk_idk/


echo "*************************************************************************"
echo "*************************************************************************"
echo "*************************************************************************"
echo "*************************************************************************"
echo "**********************COMPILE SUCCESS************************************"
echo "*************************************************************************"


